<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>活动管理系统</title>
    <script>
        // 页面加载时设置默认用户信息
        (function() {
            // 设置默认的活动管理用户信息
            if (!localStorage.getItem('activityCurrentUser')) {
                localStorage.setItem('activityCurrentUser', '活动管理员');
                localStorage.setItem('activityIsLoggedIn', 'true');
            }
        })();
    </script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #333;
            overflow-x: hidden;
            min-height: 100vh;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* 左侧侧边栏 */
        .sidebar {
            width: 280px;
            background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
            color: white;
            padding: 0;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            backdrop-filter: blur(10px);
        }

        .sidebar-header {
            padding: 30px 20px;
            background: rgba(255, 255, 255, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 20px;
            position: relative;
            overflow: hidden;
        }

        .sidebar-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
            animation: shimmer 3s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .sidebar-title {
            font-size: 22px;
            font-weight: bold;
            text-align: center;
            position: relative;
            z-index: 1;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .nav-menu {
            list-style: none;
            padding: 0 15px;
        }

        .nav-item {
            margin-bottom: 8px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            color: white;
            text-decoration: none;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-radius: 12px;
            border-left: 4px solid transparent;
            position: relative;
            overflow: hidden;
        }

        .nav-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .nav-link:hover::before {
            left: 100%;
        }

        .nav-link:hover {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
            border-left-color: #60a5fa;
            transform: translateX(5px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .nav-link.active {
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            border-left-color: #ffffff;
            box-shadow: 0 4px 20px rgba(96, 165, 250, 0.4);
            transform: translateX(5px);
        }

        .nav-icon {
            margin-right: 15px;
            font-size: 18px;
            transition: transform 0.3s ease;
        }

        .nav-link:hover .nav-icon {
            transform: scale(1.2);
        }

        .nav-text {
            font-size: 15px;
            font-weight: 500;
        }

        /* 右侧主内容区域 */
        .main-content {
            flex: 1;
            margin-left: 280px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            min-height: 100vh;
        }

        .content-header {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            padding: 25px 30px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
            overflow: hidden;
        }

        .content-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
            background-size: 200% 100%;
            animation: gradientMove 3s ease infinite;
        }

        @keyframes gradientMove {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .page-title {
            font-size: 28px;
            font-weight: bold;
            background: linear-gradient(135deg, #1e3a8a, #3b82f6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
        }

        .breadcrumb {
            color: #64748b;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .breadcrumb::before {
            content: '🏠';
            font-size: 16px;
        }

        /* 页面头部用户信息样式 */
        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .header-left {
            flex: 1;
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255, 255, 255, 0.8);
            padding: 12px 20px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #3b82f6, #1e3a8a);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: white;
        }

        .user-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .user-name {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
        }

        .user-role {
            font-size: 12px;
            color: #6b7280;
        }

        .user-actions {
            display: flex;
            align-items: center;
        }

        .btn-logout {
            padding: 8px 16px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-logout:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }

        /* 个人信息模块 */
        .personal-info-module {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .personal-info-module:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        .module-header {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            color: white;
            padding: 20px 25px;
            font-size: 18px;
            font-weight: bold;
            position: relative;
            overflow: hidden;
        }

        .module-header::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
            transform: skewX(-15deg);
        }

        .module-content {
            padding: 30px;
        }

        .info-row {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .avatar-placeholder {
            width: 100px;
            height: 100px;
            background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
            border-radius: 20px;
            margin-right: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #9ca3af;
            font-size: 28px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .avatar-placeholder::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: rotate(45deg);
            transition: transform 0.6s;
        }

        .avatar-placeholder:hover::before {
            transform: rotate(45deg) translate(50%, 50%);
        }

        .avatar-placeholder:hover {
            transform: scale(1.05);
        }

        .info-labels {
            flex: 1;
        }

        .info-label {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            padding: 10px 15px;
            background: rgba(248, 250, 252, 0.8);
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .info-label:hover {
            background: rgba(241, 245, 249, 1);
            transform: translateX(5px);
        }

        .label-text {
            width: 120px;
            font-weight: 600;
            color: #374151;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .label-text::before {
            content: '📋';
            font-size: 16px;
        }

        .label-value {
            color: #6b7280;
            font-weight: 500;
        }

        .password-input {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .password-field {
            padding: 12px 16px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            width: 220px;
            transition: all 0.3s ease;
            background: white;
        }

        .password-field:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .password-icon {
            color: #3b82f6;
            cursor: pointer;
            font-size: 18px;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .password-icon:hover {
            background: rgba(59, 130, 246, 0.1);
            transform: scale(1.1);
        }

        /* 功能模块 */
        .function-module {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .function-module:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        .function-content {
            padding: 30px;
        }

        .function-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin-top: 20px;
        }

        .function-card {
            background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .function-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #3b82f6, #1e3a8a);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .function-card:hover::before {
            transform: scaleX(1);
        }

        .function-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        }

        .function-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #3b82f6, #1e3a8a);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
            margin-bottom: 20px;
            transition: transform 0.3s ease;
        }

        .function-card:hover .function-icon {
            transform: scale(1.1) rotate(5deg);
        }

        .function-title {
            font-size: 18px;
            font-weight: bold;
            color: #1e3a8a;
            margin-bottom: 10px;
        }

        .function-description {
            color: #6b7280;
            font-size: 14px;
            line-height: 1.6;
        }

        .function-stats {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #e5e7eb;
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 20px;
            font-weight: bold;
            color: #3b82f6;
        }

        .stat-label {
            font-size: 12px;
            color: #6b7280;
            margin-top: 5px;
        }

        /* 功能详情页面 */
        .function-detail {
            display: none;
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .function-detail.active {
            display: block;
        }

        .detail-header {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            color: white;
            padding: 25px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .detail-header::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
            transform: skewX(-15deg);
        }

        .detail-title {
            font-size: 20px;
            font-weight: bold;
            position: relative;
            z-index: 1;
        }

        .back-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
        }

        .back-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .detail-content {
            padding: 30px;
        }

        .detail-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 30px;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 10px;
        }

        .detail-tab {
            padding: 12px 24px;
            background: #f8fafc;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #6b7280;
            transition: all 0.3s ease;
        }

        .detail-tab.active {
            background: linear-gradient(135deg, #3b82f6, #1e3a8a);
            color: white;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }

        .detail-tab:hover {
            transform: translateY(-2px);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .data-table th {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            padding: 15px 20px;
            text-align: left;
            font-weight: 600;
            color: #374151;
            border-bottom: 2px solid #e5e7eb;
        }

        .data-table td {
            padding: 15px 20px;
            border-bottom: 1px solid #f3f4f6;
            color: #6b7280;
        }

        .data-table tr:hover {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
        }

        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-align: center;
        }

        .status-pending {
            background: #fef3c7;
            color: #d97706;
        }

        .status-approved {
            background: #d1fae5;
            color: #059669;
        }

        .status-completed {
            background: #dbeafe;
            color: #2563eb;
        }

        .action-buttons {
            display: flex;
            gap: 8px;
        }

        .action-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-edit {
            background: #3b82f6;
            color: white;
        }

        .btn-edit:hover {
            background: #2563eb;
        }

        .btn-delete {
            background: #ef4444;
            color: white;
        }

        .btn-delete:hover {
            background: #dc2626;
        }

        .btn-view {
            background: #10b981;
            color: white;
        }

        .btn-view:hover {
            background: #059669;
        }

        .add-btn {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 20px;
        }

        .add-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s ease;
            }

            .sidebar.active {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
            }

            .mobile-menu-btn {
                display: block;
                position: fixed;
                top: 20px;
                left: 20px;
                z-index: 1000;
                background: #3b82f6;
                color: white;
                border: none;
                padding: 10px;
                border-radius: 8px;
                font-size: 18px;
                cursor: pointer;
            }

            .function-grid {
                grid-template-columns: 1fr;
            }

            .detail-tabs {
                flex-direction: column;
            }

            .data-table {
                font-size: 12px;
            }

            .data-table th,
            .data-table td {
                padding: 10px 12px;
            }
        }

        .mobile-menu-btn {
            display: none;
        }
    </style>
</head>
<body>
    <!-- 移动端菜单按钮 -->
    <button class="mobile-menu-btn" onclick="toggleSidebar()">☰</button>

    <div class="container">
        <!-- 左侧侧边栏 -->
        <nav class="sidebar" id="sidebar">
            <div class="sidebar-header">
                <div class="sidebar-title">活动管理系统</div>
            </div>
            
            <ul class="nav-menu">
                <li class="nav-item">
                    <a href="#" class="nav-link active" onclick="switchFunction('life-science')">
                        <span class="nav-icon">🔬</span>
                        <span class="nav-text">生命科学观参观管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="organ-donation-management.html" class="nav-link">
                        <span class="nav-icon">🕊️</span>
                        <span class="nav-text">遗体捐献者告别仪式管理</span>
                    </a>
                </li>
            </ul>
        </nav>

        <!-- 右侧主内容区域 -->
        <main class="main-content">
            <div class="content-header">
                <div class="header-top">
                    <div class="header-left">
                        <h1 class="page-title">活动管理系统</h1>
                        <div class="breadcrumb">活动管理 > 生命科学观参观管理</div>
                    </div>
                    <div class="header-right">
                        <div class="user-info">
                            <div class="user-avatar">👤</div>
                            <div class="user-details">
                                <div class="user-name" id="current-user-name">活动管理员</div>
                                <div class="user-role" id="current-user-role">管理员</div>
                            </div>
                            <div class="user-actions">
                                <button class="btn-logout" onclick="logout()">退出登录</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 个人信息模块 -->
            <div class="personal-info-module">
                <div class="module-header">个人信息</div>
                <div class="module-content">
                    <div class="info-row">
                        <div class="avatar-placeholder">头像</div>
                        <div class="info-labels">
                            <div class="info-label">
                                <span class="label-text">姓名:</span>
                                <span class="label-value">李四</span>
                            </div>
                            <div class="info-label">
                                <span class="label-text">年龄:</span>
                                <span class="label-value">32岁</span>
                            </div>
                            <div class="info-label">
                                <span class="label-text">身份证号:</span>
                                <span class="label-value">110101199201011234</span>
                            </div>
                            <div class="info-label">
                                <span class="label-text">二级密码:</span>
                                <div class="password-input">
                                    <input type="password" class="password-field" placeholder="请输入二级密码">
                                    <span class="password-icon">⚡</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 功能模块 -->
            <div class="function-module" id="function-overview">
                <div class="module-header">功能概览</div>
                <div class="function-content">
                    <div class="function-grid">
                        <div class="function-card" onclick="openLifeScienceManagement()">
                            <div class="function-icon">🔬</div>
                            <div class="function-title">生命科学观参观管理</div>
                            <div class="function-description">
                                管理生命科学馆的参观活动，包括预约管理、参观安排、人员统计等功能。
                            </div>
                            <div class="function-stats">
                                <div class="stat-item">
                                    <div class="stat-number">156</div>
                                    <div class="stat-label">今日参观</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-number">89</div>
                                    <div class="stat-label">预约待处理</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-number">12</div>
                                    <div class="stat-label">导览员</div>
                                </div>
                            </div>
                        </div>
                        <div class="function-card" onclick="openOrganDonationManagement()">
                            <div class="function-icon">🕊️</div>
                            <div class="function-title">遗体捐献者告别仪式管理</div>
                            <div class="function-description">
                                管理遗体捐献者的告别仪式，包括仪式安排、家属联系、场地协调等功能。
                            </div>
                            <div class="function-stats">
                                <div class="stat-item">
                                    <div class="stat-number">8</div>
                                    <div class="stat-label">本月仪式</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-number">3</div>
                                    <div class="stat-label">待安排</div>
                                </div>
                                <div class="stat-item">
                                    <div class="stat-number">45</div>
                                    <div class="stat-label">参与人员</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 生命科学观参观管理详情 -->
            <div class="function-detail" id="life-science-detail">
                <div class="detail-header">
                    <div class="detail-title">🔬 生命科学观参观管理</div>
                    <button class="back-btn" onclick="backToOverview()">返回概览</button>
                </div>
                <div class="detail-content">
                    <div class="detail-tabs">
                        <button class="detail-tab active" onclick="switchDetailTab('appointments')">预约管理</button>
                        <button class="detail-tab" onclick="switchDetailTab('tours')">参观安排</button>
                        <button class="detail-tab" onclick="switchDetailTab('guides')">导览员管理</button>
                        <button class="detail-tab" onclick="switchDetailTab('statistics')">统计报表</button>
                    </div>

                    <!-- 预约管理 -->
                    <div class="tab-content active" id="appointments">
                        <button class="add-btn" onclick="addAppointment()">➕ 新增预约</button>
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>预约编号</th>
                                    <th>参观者姓名</th>
                                    <th>联系电话</th>
                                    <th>参观日期</th>
                                    <th>参观时间</th>
                                    <th>人数</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>LS001</td>
                                    <td>张三</td>
                                    <td>138****1234</td>
                                    <td>2024-01-15</td>
                                    <td>09:00-11:00</td>
                                    <td>5人</td>
                                    <td><span class="status-badge status-approved">已确认</span></td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewAppointment('LS001')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editAppointment('LS001')">编辑</button>
                                            <button class="action-btn btn-delete" onclick="deleteAppointment('LS001')">删除</button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>LS002</td>
                                    <td>李四</td>
                                    <td>139****5678</td>
                                    <td>2024-01-16</td>
                                    <td>14:00-16:00</td>
                                    <td>3人</td>
                                    <td><span class="status-badge status-pending">待确认</span></td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewAppointment('LS002')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editAppointment('LS002')">编辑</button>
                                            <button class="action-btn btn-delete" onclick="deleteAppointment('LS002')">删除</button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>LS003</td>
                                    <td>王五</td>
                                    <td>137****9012</td>
                                    <td>2024-01-14</td>
                                    <td>10:00-12:00</td>
                                    <td>8人</td>
                                    <td><span class="status-badge status-completed">已完成</span></td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewAppointment('LS003')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editAppointment('LS003')">编辑</button>
                                            <button class="action-btn btn-delete" onclick="deleteAppointment('LS003')">删除</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!-- 参观安排 -->
                    <div class="tab-content" id="tours">
                        <button class="add-btn" onclick="addTour()">➕ 新增参观安排</button>
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>安排编号</th>
                                    <th>导览员</th>
                                    <th>参观时间</th>
                                    <th>参观区域</th>
                                    <th>预计人数</th>
                                    <th>实际人数</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>TOUR001</td>
                                    <td>导览员A</td>
                                    <td>2024-01-15 09:00</td>
                                    <td>生命起源展区</td>
                                    <td>20人</td>
                                    <td>18人</td>
                                    <td><span class="status-badge status-completed">已完成</span></td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewTour('TOUR001')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editTour('TOUR001')">编辑</button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>TOUR002</td>
                                    <td>导览员B</td>
                                    <td>2024-01-16 14:00</td>
                                    <td>进化论展区</td>
                                    <td>15人</td>
                                    <td>-</td>
                                    <td><span class="status-badge status-pending">待开始</span></td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewTour('TOUR002')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editTour('TOUR002')">编辑</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!-- 导览员管理 -->
                    <div class="tab-content" id="guides">
                        <button class="add-btn" onclick="addGuide()">➕ 新增导览员</button>
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>工号</th>
                                    <th>姓名</th>
                                    <th>联系电话</th>
                                    <th>专业领域</th>
                                    <th>工作状态</th>
                                    <th>本月导览次数</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>G001</td>
                                    <td>导览员A</td>
                                    <td>138****1111</td>
                                    <td>生命起源</td>
                                    <td><span class="status-badge status-approved">在岗</span></td>
                                    <td>25次</td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewGuide('G001')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editGuide('G001')">编辑</button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>G002</td>
                                    <td>导览员B</td>
                                    <td>139****2222</td>
                                    <td>进化论</td>
                                    <td><span class="status-badge status-approved">在岗</span></td>
                                    <td>18次</td>
                                    <td>
                                        <div class="action-buttons">
                                            <button class="action-btn btn-view" onclick="viewGuide('G002')">查看</button>
                                            <button class="action-btn btn-edit" onclick="editGuide('G002')">编辑</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!-- 统计报表 -->
                    <div class="tab-content" id="statistics">
                        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px;">
                            <div style="background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
                                <h3 style="color: #3b82f6; margin-bottom: 10px;">本月参观总人数</h3>
                                <div style="font-size: 32px; font-weight: bold; color: #1e3a8a;">1,234</div>
                            </div>
                            <div style="background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
                                <h3 style="color: #10b981; margin-bottom: 10px;">预约成功率</h3>
                                <div style="font-size: 32px; font-weight: bold; color: #059669;">95.8%</div>
                            </div>
                            <div style="background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
                                <h3 style="color: #f59e0b; margin-bottom: 10px;">平均参观时长</h3>
                                <div style="font-size: 32px; font-weight: bold; color: #d97706;">2.3小时</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>




        </main>
    </div>

    <script>
        // 页面加载时设置用户信息
        document.addEventListener('DOMContentLoaded', function() {
            const activityCurrentUser = localStorage.getItem('activityCurrentUser');
            if (activityCurrentUser) {
                document.getElementById('current-user-name').textContent = activityCurrentUser;
            }
        });

        // 切换侧边栏（移动端）
        function toggleSidebar() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('active');
        }

        // 切换功能模块
        function switchFunction(functionName) {
            // 移除所有活动状态
            document.querySelectorAll('.nav-link').forEach(link => {
                link.classList.remove('active');
            });
            
            // 添加活动状态到当前点击的链接
            event.target.closest('.nav-link').classList.add('active');
            
            // 更新面包屑
            const breadcrumb = document.querySelector('.breadcrumb');
            if (functionName === 'life-science') {
                breadcrumb.textContent = '活动管理 > 生命科学观参观管理';
                breadcrumb.innerHTML = '🏠 活动管理 > 生命科学观参观管理';
            }
            
            console.log('切换到功能:', functionName);
        }

        // 打开生命科学观参观管理
        function openLifeScienceManagement() {
            // 跳转到生命科学馆管理页面
            window.location.href = 'life-science-management.html';
        }

        // 打开遗体捐献告别仪式管理
        function openOrganDonationManagement() {
            // 跳转到遗体捐献告别仪式管理页面
            window.location.href = 'organ-donation-management.html';
        }

        // 返回概览
        function backToOverview() {
            document.getElementById('function-overview').style.display = 'block';
            document.getElementById('life-science-detail').classList.remove('active');
            // 更新面包屑
            document.querySelector('.breadcrumb').innerHTML = '🏠 活动管理 > 生命科学观参观管理';
        }

        // 切换详情页面的标签页
        function switchDetailTab(tabName) {
            // 移除所有标签页的活动状态
            document.querySelectorAll('.detail-tab').forEach(tab => {
                tab.classList.remove('active');
            });
            document.querySelectorAll('.tab-content').forEach(content => {
                content.classList.remove('active');
            });
            
            // 添加活动状态到当前标签页
            event.target.classList.add('active');
            document.getElementById(tabName).classList.add('active');
        }

        // 生命科学观参观管理相关函数
        function addAppointment() {
            alert('新增预约功能开发中...');
        }

        function viewAppointment(id) {
            alert(`查看预约 ${id} 的详细信息`);
        }

        function editAppointment(id) {
            alert(`编辑预约 ${id}`);
        }

        function deleteAppointment(id) {
            if (confirm('确定要删除这个预约吗？')) {
                alert(`删除预约 ${id}`);
            }
        }

        function addTour() {
            alert('新增参观安排功能开发中...');
        }

        function viewTour(id) {
            alert(`查看参观安排 ${id} 的详细信息`);
        }

        function editTour(id) {
            alert(`编辑参观安排 ${id}`);
        }

        function addGuide() {
            alert('新增导览员功能开发中...');
        }

        function viewGuide(id) {
            alert(`查看导览员 ${id} 的详细信息`);
        }

        function editGuide(id) {
            alert(`编辑导览员 ${id}`);
        }





        // 退出登录
        function logout() {
            // 清除活动管理相关的登录信息
            localStorage.removeItem('activityIsLoggedIn');
            localStorage.removeItem('activityCurrentUser');
            localStorage.removeItem('activityRememberMe');
            localStorage.removeItem('activityUsername');
            
            // 跳转回主页
            window.location.href = 'index.html';
        }

        // 密码显示切换
        function togglePassword() {
            const passwordField = document.querySelector('.password-field');
            const passwordIcon = document.querySelector('.password-icon');
            
            if (passwordField.type === 'password') {
                passwordField.type = 'text';
                passwordIcon.textContent = '👁️';
            } else {
                passwordField.type = 'password';
                passwordIcon.textContent = '⚡';
            }
        }

        // 为密码图标添加点击事件
        document.addEventListener('DOMContentLoaded', function() {
            const passwordIcon = document.querySelector('.password-icon');
            if (passwordIcon) {
                passwordIcon.addEventListener('click', togglePassword);
            }
        });
    </script>
</body>
</html>
